package zzps.exeed.kernel.holder;

/**
 * 值注射器，
 * 1，用于被管理的对象的字段的值注入
 * 2，通过方法实例化对象时收集方法参数值的注入
 */
public abstract class ValueInjector {

    private boolean ready;
    private ValueGather valueGather;
    public abstract void setValue(Object value);
    public abstract Object getValue();
    public boolean ready(){
        return ready;
    }
    protected void ready(boolean ready){
        this.ready = ready;
        if (valueGather != null){
            valueGather.run();
        }
    }
    public abstract Class<?> getType();
    public void setVarValueGather(ValueGather valueGather){
        this.valueGather = valueGather;
    }

}
